<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var age=prompt("请输入班长兜里的钱");
                if(age>2000)
                {
                     document.write("请大家吃西餐")
                 }
                 else if(2000<age,age>1500)
                 {
                     document.write("请大家吃快餐")
                 }
                 else if(1500<age,age>1000)
                 {
                     document.write("请大家喝饮料")
                 }
                 else if(1000<age,age>500)
                 {
                     document.write("请大家吃棒棒糖")
                 }
                 else if(500<age,age>=0)
                 {
                     document.write("下次把钱带够")
                 }
                 else{
                    document.write("输入错误")
                 }
    </script>
</body>
</html>